export const formatDate = (nowDate) => {
  // 此时的date是我们传入的时间戳
  const DateTime = new Date(nowDate * 1000)
  const year = DateTime.getFullYear().toString() //年
  const month = (DateTime.getMonth() + 1).toString() //月
  const date = DateTime.getDate().toString() //日
  const hh = DateTime.getHours().toString() //时
  const mm = DateTime.getMinutes().toString() //分
  const ss = DateTime.getSeconds().toString() //秒
  const day = DateTime.getDay().toString() //周
  const dayData = {
    0: '日',
    1: '一',
    2: '二',
    3: '三',
    4: '四',
    5: '五',
    6: '六',
  }
  //return `${year}-${month}-${date} 星期${dayData[day]} ${hh.padStart(2,0)}:${mm.padStart(2, 0)}:${ss.padStart(2, 0)}`
  return `${year}-${month}-${date} `
}
